import React, { Component } from 'react'
import '../css/Login.min.css'

class Login extends Component {
	constructor(props) {
		super(props)
		this.state = {}
	}
	render() {
		return (
			<div className="login">
				<div className="top">
					<p>
						<span> 账号登录 </span>&emsp;| &emsp; <span>扫码登录</span>
					</p>
				</div>

				<div className="bottom">
					<input type="text" placeholder="邮箱/手机号码/小米ID" ref="username"/>
					<input type="text" placeholder="密码" ref="userpwd"/>

					<button onClick={()=>{
            console.log(this.refs.username.value);
            this.props.history.push({
              pathname : "/",
              state : {
                username : this.refs.username.value
              }
            })
          }} >登录</button>
					<p className="sj">手机短信登录/注册</p>
					<p className="register">
						<span>立即注册 | 忘记密码？</span>
					</p>
				</div>
			</div>
		)
	}
}

export default Login
